import request from "./request";
import { message } from "antd";

export const logout = async () => {
  try {
    await request.post("/logout");
    message.success("已成功退出登录", 1.5, () => {
      window.location.href = "/YiStock/Login";
    });
  } catch (error) {
    // 错误已经被 request 拦截器处理，这里不需要额外处理
  }
};
